Create /updatelayers hook, reformat output of gs_slurp to avoid code duplication