move static function references to Script.java