various API fixes, started documentation, PEARification