Added some functions and documentations.