Fix some bugs and add support for rooms weights