Applying some fixes andupdates, moved to python 2.7