minimac refactor: change architecture and add simulation (sim working)