repartitioned parsing engine into its own file