refactored entire message model to support linkedlist schema