Cleanup and more tests
Correct whitelisting to only get triggered on save