Also remove globally stored path for modpath and data. Basically use less global variables for better adaptation to multithreading.
Probably not working for now (untested), still some things to do Also making the code cleaner