Refactor planner.clj into planner, table and distance .clj