Splitting the script in 2 parts: createrapid.py and runrapid.py