Refactoring Content controller to remove duplicate and remove useless piece of code