Moved connect/disconnect into Query()

Once we start doing more queries per page load this will have to change