Actually closes #27 Added shared_ptr check and tests