Finish code to save persistent route data to db