Implemented scaling of the object and the rotation function