WIP: Use factory to get the correct execution mode