some more cleanup and docs