Refactored further
Added a new PopupTaskHandler interface so that call backs can be called
from Task.