Remove unused refs cleanup