Added include guards to header files. The query threads are now spawned once connection is complete. Put the basis in of more information about the connection state