Added helper functions to the Rectangle class to easily center it