Made MESSAGE_SPECS and SPEC_LOOKUP public in case anyone needs them.