Remove unused references and files