Changed random number generator with java one, so that we can have repeatable runs
Implemented an algorithm for DEM delineation