Added Popup functionality and removed the old version