Made Rectangle and ComplexRectangle intercastable

Removed IndexNotFoundException. (It's used the same as the
System.Collections.Generic.KeyNotFoundException, which I did not see.)