Refactor compute_costs and DIRECTIONS
Add new compute_costs file