Added comments & refactored popups