added a QListWidget on QDialog + tidy up a bit