Replaced unneeded Rectangle instances by Size instances.