Move ICS match setup logic to a separate file.