Updated Spritesheet code