Fix the issue of viewable profile background menu on other users profile
Some code refactoring and making it php5.4 compatible by removing references