modifications to the route api, added a simple front end api.