Removed some legacy code from erd_depth