Pop-ups, better management.

Rearranging some things for popups and making better script/css
management.