Merging the parser code. And improving the q_parsertest function