Some updates to getPosts