Adding comments and removing an unnecessary memory copy