Added distance
Major cleanups