More improvements to parser