Fix Parser, add tests and clean up code
Implement handler to call parser and return json