second wave refactoring (WIP)