-some performance tweaks
-fixed some notices/warnings refering to undefoned variables and indexes
-added a new function prepareString to make sure input strings from forms have a correct format
-made run_id alphanumeric from numeric in order to accept complex formats. These formats are to be pharsed bu the above prepareString function.