This reverts commit 8d1b881d54. Needs more commits from master than I have time to dig out right now.
8d1b881d54