commented and refactored rooms controller