Added some more function documentation