Optimizations

Here are come scanner and parser optimizations, I hope you'll like them :)