Added some documentation to the allocation functions