Refactoring legacy codes related a execution object