Moved sprite functions to a SpriteSheet class