Refactor purger, fix NPE if no config-history
Add tests for BadgeAction and Purger