added tests for Rect. It prompted some drastic changes into its code, but it was for the best