Improve viewport movement to only change at extremes
add distance function for two points
Add redraw command, clear screen when generating the map