rewrite object parsing to make it way simpler; also added comment and $q...

...uery parsing


@imlucas 
1. added parsing of comments
2. added parsing of $query
3. rewrote the parsing of queries, it was way too complex and there was a lot simpler solution by using JSONL