Check if listview exists before removing it

Some minor changes, and a check for listview-existence before we try to remove it.