cleaned up, commented, refactored chatroom.controller submitInput