Small fixes and cleanup.