Replaced RefCounter used in List and Map with smart pointers