Improve function documentation