Save work state - maybe I refactor this whole settings page to make the code more clear and reach a better performance via ajax.