Refactoring codes.