Add godoc comments and extend README.