Fixed several bugs related to improperly disconnecting, moved the Room and Client objects to a new file and update tests