add test suite, move parser into its own file