Fixes with auto

Have replaced auto with const auto& or exact types