Changed some shared_ptrs into unique ptrs and added an implementation of make_unique