Kscaled patch from Ute

This request contains both Ute's patch to Kscaled and my new version of scanpp.