issue 1787 changes following review comments plus clean up for 1 port