Relayout and add groups in preferences dialog