Extracting all the view related code to a new class.
Creating two new packages to organize the dialogs
Fixing References