Added API documentation for each function