Edited scripts to support python3.