Some General Improvements

See commit messages for details.