Small fixes to make program compile.
Also small changes to Sprite.