Optimized SpriteSheet code