Further changes to initDirections() and getDirections()