minimac refactor: complete rework of architecture, sim ok