cleanup, docblocks, typehinting