Testcase for #120
Fix #120. Some refactoring in query method.
Tabs are converted to spaces
Merge pull request #121 from DSoftOut/issue-120

Issue 120