Added refClear to clear all references for an object