Improved dealing with locals and globals in inline_script
Clean-up dispatch code
Change script tab on name change (#152)