convert headers to use shared pointers/arrays in attempt to solve some memory leaks created by getting rid of static variables