Cleaned up whitelist detection