various changes outlined in comments.txt