New features and fixes

* Added purging by definition.
* Fixed key prefix setting not being saved.
* Fixed purge as it was not deleting anything.