Extract query parsing logic into
source formatting and javadoc added
Merge branch 'pull-request-49'