Added optional w/h to unifyDimensions