Tidied up TexturedMesh renderer code