Added ref/deref and heap/delete to utils