Refactor the runner
Convert task to eventemitter