dia to sml: rejig shared pointers to see if valgrind warnings go away