Tested ver2 script and made a few fixes