refactorCode