Adds connect and disconnect methods to database class.