Clear existing whitelists if installing new app
Fixed applying template in relation to default restrictions

Fixes #1566
Prefix export file name with date

Fixes #1625
merge