Reprogrammed everything using a coroutine.