Grid changed. Random generation in SOM added. + some minor changes