Added MIT license and did some tweaks.