minor changes (replacing memcpy with std::memcpy, debug statements, ...)