*major* code cleanup and made small tweaks to dialog titles, etc