WIP calc scenario

Factor out itree code lookup logic to share with single tree eco endpoint.