Improving raster functions.
Minor fixes