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)
I guess the text for RUNNING and NOT_RUNNING should be changed ;) , but overall, it seems a better solution!