Modified version of MultiStackRegistration, for use from scripts.