cleanup of win/core.py