REF cleanup