Please review branch feature/optimizations

There are seven individual fixes in this pull request. Expand the individual commit comments for explanations of each.