Remove unused function in controller