changes for python3 compatibility. Also followed some suggest by 2to3 to...

...ol. Some chnges in setup may have broken darwin compilability. This should be checked before to merge