Fixed a lot

Your random would cap it near the top for some reason.  Also made it
output an image file to view.