Move helper function to end of file

http://talks.golang.org/2013/bestpractices.slide#11
Update Godoc