Add documentation to functions