setup.py cleanup

Hopefully last removal of unused code, so is is easier to read, understand what it's doing and hopefully refactor.