Replace terrible class with an awesome coroutine