Added scale function (instead of x2)
Other changes