More measure refactoring + parser fixes.