some cleanup and doc work