javascript interpreter cleaning functions, rewrote the pemapmodder.js package, made it run on background thread