Refactoring of parallel job submit script