---/St.An: Implemented window persistency. Fixed some threading problems. Fixed unhandled exceptions during shutdown.