Split scaleBody() function into a separate file.