Adding shiftSize to calculate (without doing the whole stac procedure) the size of the output image. Moving the help stuff out to separate files