A bunch of smaller changes and fixes.