documentation finished, PC and SP refactored a bit