UI update to map directions. js cleanup, part 1
js cleanup, part 2