Refactored facing and texture to render code.