Refactor on demand dialog

Remove nested runnables