finally proximity calculation improved.

Also did some mayor changes .. and added some interface stuff, eg reloading the simulation and changing the timer interval