Add MIT license file
Run gofmt and fix some minor bugs
Complete test file