Moved viewer to elements, added popupoverlay lib.