Refactor: Replace memory aliasing with std::string