Fix files that do work on import instead of only if __name__ == __main__

I'm not sure changes are needed for this file. We'll need to see what comes up when we remove it from the whitelist.