Update lib/ files to python 3