Added pagination to messages