Refactored Parser into its own module