Added support for a distress code, and moved codes into the config file.