added support for dimmable lights
Created reusable model inspired by backbone mvc