Merge pull request #2581 from mimimi085181/FreeTexture-code-cleanup Code cleanup for FreeTexture after merging PR #2097