removed unused code and add some comments on popup page to say it is popups