added support for multiple devices and rooms and a few little cleanups.more to come