Generalize texture initialization and destruction. Perform more code cleanup.