code optimised by removing extra lines
conflict resolved
HomeSearvice functions are optimised along with home controller functions for frontend