Added ImageMap and ImageReduce code