Refactored Rect into new module