Added refactoring code.