Tidy up imports
Start python 3 support