Refactor to have common exit channel

More DRY and easier to follow without chan chan error.