Refactoring of Program