Add functions file and metro ID handling

Added regional affiliations form and saving.
Added common helper functions (get_slug, get_id, etc).