Refactor parser.
Add clean to makefile.