Updated grammar to better match CSS3; first few optimizations