Some classes are refactored.