More cleanup of legacy code.