Improved blocklist function and add whitelisting.