WIP change alloc mechanism for refcount