Use an Optional to hold endpoint name.

+ use Optiona to hold endpoint name
+ remove duplicate code in GET_ADDRESS

hat-tip: jsirois for these excellent suggestions in his review