Tweaked randstr signatures, wrote some unit tests.
Ran gofmt on codebase