Useless code removal