Moved where the callback function was called, so that it can optionaly alter the route data if necessary