Clean up some of the legacy code.