more cleanup and docs