Some MTwist and smartptr cleanup. Make smartptr compile faster, have minimal interface.