Refactoring with 2 programs