Change member variable from reference to shared_ptr to shared_ptr

Using a reference was causing serious problems in C++11 and was totally unnecessary.
Minor change struct->class to eliminate compiler warning