Finished rectangle implementation related to issue#1.