textures, code cleanup