Major revamp of class structure