Reopening windows from tray fixed.
Better session management.
Less redundant code?
Reopening windows moved to session.py.