Switch some declarations prior to adding intermediate hop support.
Add intermediate handling