Added auto-save on leave
> minor bugfixes