Remove unused code in ResourceCOntroller