Render popup as per latest shows according to User Preferences

Currently have to reload the app everytime a user preference is changed
to see the correct popup. Need to sync preferences with popup. Also
fixing a bug in popup.js