Improvements to function documentation