refactoring; output dirs;  cell & formulae weights