Finish fixing bugs; tests are green.