Moved all the related functionality from script_task to devtools.rs