lots of docs and cleanup and such