removed the writeraster stuff and made a few aesthetic changes.