Added reading and writing of sprites.