Moved parsing into its own file.