Move appropriate comments into docstrings.
Add MIT license.