fixed a bug in World::setState; modified cube to use world class