fixed Save optimization, did some refactoring on BE, fixed button status...

...es for both optimization and calibration

https://trello.com/c/kisaYeTE/372-save-optimization-does-not-do-anything

(should preferably be reviewed by someone who can check both BE and FE)
great!