Refactor room manager