gui fix, save fix, refactor, fixes