Refactoring with code and map;

Maximum distance is now calculcated based on bounds.
Need to come up with better way to find maximum distance.