batch scripts re-implemented, plotting macros added, analysis re-strucrured