Adding scaling to customaddshadow and custom pad. Plus small fixes for other scripts and updated tests.