Newer version of the script upstream
Code cleanup