Fixed faulty constructor
Improved logging
Improved KeepAlive thread (only send keepalive commands when necessary)
QueryError now extends Wrapper