Take in consideration the original entryorguid and sourcetype from the mainform when generating the SQL, instead of taking the first item in the listview
When generating SQL, print '@ENTRY*100+x' instead of the entire entry of the script
Fix the printing of sourcetypes in the output form
Fix the printing of 'AND source_type IN ()' with more than one source type