Parser optimizations, tests update