Refactor the distance to move out.