Refactored how packages and message field types are calculated.