Cleanup preferences dialog.