Fix memory leak in the sprite class
Fix sprite randomness