Some tweaks to popup codes