Better implementation of attaching comments

In new implementation comments are applied to AST immediately after it was created, this makes traversing of AST safer.
Tests are feeling good plus I have placed extra assertions.