Extracted popups into a class