Started the refcountable functions implementation
Merge branch 'develop'