Make Sprites use ResourceManager, and refactoring