Beginnings of godoc commenting, some refactoring
Beginnings of godoc commenting, some refactoring