Remove unused functions and service reference.