A few bug fixes, improved documentation, added MIT license.