Various small code cleanups.