Assorted Cleanup

See commit messages for details