Moved "fetch posts" logic in own module.