Added MaxDistance

Added MaxDistance, saved cross-session