Refactoring code completed.