Various code cleanliness fixes.