modified program to save and receive intermediate data from potentially different directories; added documentation files