-Fixed global and persistent issues with some modules
-Reorganized script functions