Reorganize class structure.