cleanup of legacy code