Well, this PR isn't really complete yet—I might move this to another one indeed.