Refine class structure