add save and undo button functionality
add fixes
remove sync from window scope