Implement recommendations from #4864