refactor: renamed "mime" var to "scriptType" to avoid ambiguity