Moved MESSAGE_SPECS into a function.