Decoupling the Query and Database classes and adding a QueryResult class to wrap the PDO class which will hopefully make unit testing much easier.