Modularized overlay code a bit. Toggling a window thats behind other
windows now brigns it to the frotn instead of exits it.