Made changes as per code review feedback
WIP - making samples work with scaleout