More setup.py fixes for pip
Fix a couple of imports (to avoid circular imports among other things)