Completed parser, misc fixes