I would put this more general stuff above the specific functions, I think.