Fix warning in query + reindenting + whitespace/tab cleaning

Hello,

this is a second pull request. This corrects some warnings while using the module on 2.5. I think this applies to 2.4 as well.

Hope you like.

Kind regards,
Daniel