Added JavaScript threading