Started the refcountable functions implementation