Remove some warnings and dead code.