Refactored code. Further adjust run time scen.