Cleanup the connection and moving string class into seperate file.