Refactored to order posts and comments by timestamp