Added function documentation.