Added functions scaleInner() and scaleOuter().