more cleanup/refactor in advance of binding