Started to refactor pointers into shared_ptr-s