improved modularity of chat room and lunch room code