Revised the class structure.