fixed the exit
second commit

added most of the functionality, moved the list fill to a function,
overrided the rejected and close events so I can refresh the list