huge stale code cleanup