added sprites support
implemented caching
implemented caching for sprites