added sorting by name as well as saving list to file on closure