fixing documentationordering in material functions
adding documentation to source file
fixing function to throw exception
fixing documentation in cython file