Minor api improvements

While implementing the LIFX binding I added a few API improvements and fixes. Each fix is an individual and independent commit.