Fix messages queries and add messages atom feed