Rewrite documentation for a function.
Rewrite parts of the implementation to make it easier to read.