Fixed public destroy function

Added a line that removes all overlays and popin modals from the dom.
They would build up otherwise.