Allows the rotating of sprites

Also a bit of miscalianous work in a few other places.