minor improvements to parser