moved parser into its own module