Full version of reference count update

More to follow.. keep looking..