minimac refactor: complete rework or architecture (not tested)