Tasks refactored to store state in batch instead of variables and mashlog
Refactored data storage