Add button save and refactor save