Now waits for machine to be ready.
Uses local writes.

Does not write to global mem every iteration.