Removing dependency on dialog