Working on the popup code