still more variables have been added to this script for matenance.
changed somethings around to get rid of useless directories bassed off resent tests