smartptr shenanigans

setup smartpointer usage for singleton classes to ensure that pointers
are destroyed on program close.