Added some function documentation.