refactor getIndexQuery() and coding style
Merge branch 'master' of github.com:cizar/glass_onion