Add documentation for functions