Use some fancy promises instead of callback functions

(the end result is basically the same)

Fix regression from saving to /categories instead of
/categories/save_preferences