Added documentation.
Renamed function.