Remove duplicate popup code

Fix for #134
Merge pull request #137 from tomchadwin/master

Remove duplicate popup code