first version of major rewrite for batch automation (non-interactive, using only a config file)