Additional fixes and improvements (scale and jagged gaps).
Added additional scale parameter for better control.