Eliminating the long-running process : separating code and state