Reworking preference dialog and other dialogs.

Signed-off-by: Kristian Duske <kristian.duske@gmail.com>