Some dead code removal