Added route functionality

Fixed bad json dump when saving a route.