Made a number of adjustments

For more detail, see commit messages.