Codes refactoring.