Improved functionality for getting directions