Added comments and added scaling to rendering of sprites.