Parser grammar improvements

Hey Pekka, 

please take a look at my changes and merge them if you think they're okay! Just tell me if something is wrong. 

Alex