cleanup and reorganize tree, improve some docs.