Revert "Revert this stuff"

This reverts commit 3214f63ab3bbbb704d3c697793342ce9b0a0b685.