Sprite generator refactoring