Minor fixes and cleanup.