Revised emergency message code support to more flexible format. Still pretty sloppy, but a better approach.