refactored some structure. fixed bugs for saving & sending resetKey