file references cleanup