Whoa, one more big commit. I didn't manage to untangle the changes while working towards compatibility.