Used Rectangle::get_center instead of manually computing it.

There were some places in the code where the position of the center of a Rectangle was obviously manually computed. I used get_center instead to simplify the code.