Implements the reviews from #3987 and #3988. Special thanks to the committers and reviewers there. Co-authored-by: Harry Peach <harrypeach1999@gmail.com> Co-authored-by: Kamyar Ghasemlou <kamyar@kamy.me> Co-authored-by: Leonardo Freua <leonardo.batista.freua@gmail.com>