Expanded the logic class, and fixed a problem concerning identifying an graphical rectangle object with its index