Updated documentation for function
Added documentation to all functions