Fixing issues with Indentation
Modifying script to make it work on Python 3.0+