References cleanup