Moved continuation handling out of runtime.c