public static void initializeExecutor(String resDirectory) {
		PokemonType.initializeTypes();
		JSPokemonEngineHandler.initializeTypeHandlers();
		System.out.println("Initializing JavaScript...");
		
		//Init scope handlers (THIS, TARGET, etc)
		pokemonHandlerTHIS = new JSPokemonHandler();
		pokemonHandlerTARGET = new JSPokemonHandler();
		
		
		jsEngine = new ScriptEngineManager().getEngineByName("javascript");
		pokemonEngineHandler = new JSPokemonEngineHandler();
		binds = new SimpleBindings();
		binds.put("pokemon", pokemonEngineHandler);
		binds.put("THIS", pokemonHandlerTHIS);
		binds.put("TARGET", pokemonHandlerTARGET);
		class pathconstants implements ImgPathConstants{}
		binds.put("PATH", new pathconstants());
		FileLister fl = new FileLister(resDirectory);

		File[] jsFiles = fl.getFiles();

		for (int i = 0; i < jsFiles.length; i++) {
			FileReader fr;
			try {
				System.out.println("Handling: " + jsFiles[i].getName());
				fr = new FileReader(jsFiles[i]);
				jsEngine.eval(fr, binds);
			} catch (FileNotFoundException e) {
				System.out.println("JSExecutor: File not found");
				e.printStackTrace();
			} catch (ScriptException e) {
				System.out.println("JSExecutor: Script error");
				e.printStackTrace();
			}

		}

	}