improvements to reference parser