private SootMethod initializeSoot() {
		Options.v().set_no_bodies_for_excluded(true);
		Options.v().set_allow_phantom_refs(true);
		Options.v().set_output_format(Options.output_format_none);
		Options.v().set_whole_program(true);
		Options.v().set_soot_classpath(apkFileLocation + File.pathSeparator
				+ Scene.v().getAndroidJarPath(androidJar, apkFileLocation));
		Options.v().set_android_jars(androidJar);
		Options.v().set_src_prec(Options.src_prec_apk);
		Main.v().autoSetOptions();
		
		// Configure the callgraph algorithm
		switch (callgraphAlgorithm) {
			case AutomaticSelection:
				Options.v().setPhaseOption("cg.spark", "on");
				break;
			case RTA:
				Options.v().setPhaseOption("cg.spark", "on");
				Options.v().setPhaseOption("cg.spark", "rta:true");
				break;
			case VTA:
				Options.v().setPhaseOption("cg.spark", "on");
				Options.v().setPhaseOption("cg.spark", "vta:true");
				break;
			default:
				throw new RuntimeException("Invalid callgraph algorithm");
		}

		// Always update the entry point creator to reflect the newest set
		// of callback methods
		SootMethod entryPoint = createEntryPointCreator().createDummyMain();
		Scene.v().setEntryPoints(Collections.singletonList(entryPoint));
		Scene.v().addBasicClass(entryPoint.getDeclaringClass().getName(), SootClass.BODIES);

		for (String className : this.entrypoints)
			Scene.v().addBasicClass(className, SootClass.BODIES);	
		Scene.v().loadNecessaryClasses();
		
		return entryPoint;
	}