Added ability to run batch macros in different threads