better tests, cleaned up code and got a MUCH better parser thanks to @charliesome