Feature/grammarv2

Implemented grammarv2, tested, works smooth.