- Removed some unused std::shared_ptr objects.
- Replaced some std::shared_ptr<T> by T& or T.