Finishing touches and bugfixes

This commit provides the finishing touches, like managing model
and filter deletion, sorting, and bugfixes to the Qt5 version of
the test.