preferences dialog, more complete and layout fixes