Done, plus a test. I'm also rebasing.