Some enhancements

Very cool lib. I added some enhancements for my usecases in [pimatic](http://www.pimatic.org).