Add unit tests. Add changes for golint. Add in interface for errors.