Get rid of some smart pointers