minor fixes; reordering lexer rules