Python 3 ready.

++ all the print commands are renewed [print '' --> print('')]
++ minor cleanups