More cleaning up and commenting.