Bugfixes & improvements

Session now saves on window close
Maybe I fixed the bug now? (PLEASE)