clean up
actually completed parser, complete with functions and stuff