removes unused methods and routes