many small revisions and tweaks