Added further tests and started query parsing