Moved parser into its own module