This commit probably breaks things, but I've waited too long to commit this code.