Added some function documentation