Refactored the popup as a class with code instead of png
code cleanup