Updated all scripts with main() functions, for conda compatibility