Merge in some code from github.com/quarnster/lime + documentation.