Fix class structure