Refactor Messages pg