Some trivial refactorings concerning removing RefCounter