Remove duplicate unused code