Basic join room functionality and some refactoring.