Refactoring, setting up whitelist