Rearranging class structure