Removing the unused method and variable from controller