Fix crashes from uninitialized variables, small naming fix for smart pointers