Override prepare query functions

This PR is based off of #6.

It allows both prepareAutoQuery and prepareManualQuery functions to be overridden.
Would it have been silly to have kept the complexity down? i.e just creating functions for the sake of it? It's a code smell to see jshint directives, so just having a sniff!