Housekeeping

This pull request does some housekeeping to clean some things up

See individual commit messages for details.