whitelist.py: shorten some lines, add more type aliases.