Refactoring console app by leveraging XML template.