Made refcounting in SGObject use the RefCount class [WIP]