Forgot to add a test and some cleanup.