These changes are arbitrarily divided into multiple commits to make it easier to find potentially introduced bugs with git bisect.