Move ScriptEngine into its own files