Some code cleanups.