added a load of undocumented functions & edited docs