Dynamic texture and code cleanup