fix exception when controller closed before simulation start.

Also changed to hide query window when in sim mode.
Query dialog now shows sim names (don't use them though cause it's broken!)

Added accessor for sim names from persistence manager.