Add proper godoc comments for funcs.go