[milestone-06] Changing to shared_ptrs and removing unused code