multi-sub format refactoring among other changes