Removed unnecessary methods and optimized getCenter() in classes
implementing Shape