Fixed iteration bug, grav2d generator, and updated the interface.