Updated main.py match old Bitbucket source

Updated match old Bitbucket SoniEx2 branch