Core of Refactoring done