changed protocols, edited parameter tmpvariables to tmpfolders/files cre...

* changed protocols, edited parameter tmpvariables to tmpfolders/files created by a function in the header
* removed unused tmp folders