test helpers and cleanup

These changes are based on @davecheney's code review:
https://codereview.appspot.com/58500043/

Since the API hasn't changed, I thought I might as well submit them here too.
more typo fixes
code review from Ian Lance Taylor
Merge pull request #86 from gophertown/cl58500043

test helpers and cleanup