* group code somewhat sanely in separate files * unify output of update endpoint requests and the rest as preparation for templates