Change whitelist approach to simplify code and boost performance.