Revert "first generate and execute *-local, then *-remote"

This reverts commit cf22499538266b1b4fac1694254edfd8ba9be68d.
refactor so that there is no interaction between code-local and code-remote

Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>