Script decompilation tweaks and fixes