@SuppressWarnings({ "unchecked", "rawtypes" })
	public void SaveLevel() {
		System.out.println("Attempting level save.");
		new Thread(new Runnable() {
			public void run() {
				for(int i = 1; i<=Layers; i++) {
					File layer_file = new File(workingDir, ("Layer" + i + ".dat"));
					FileSystem.SaveDatFile(LayerList.get((i - 1)).tiles, layer_file);
				}
				if(colltype.equals(CollisionType.ADVANCED_COLLBOX)) {
					for(int e = 1; e<=Layers; e++) {
						File layer_file = new File(workingDir, ("Layer" + e + "_Collision.dat"));
						FileSystem.SaveDatFile(collisionLayers.get(e - 1).tiles, layer_file);
					}
				}
				
				File LevelConfig = new File(workingDir, "level.yml");
				try {
					LevelConfig.createNewFile();
					YamlConfig configYML = new YamlConfig(LevelConfig);
					Map config = configYML.getMap();
					if(config == null) config = new HashMap();
					config.put("WarPigionVersion", WPEngine1.Version);
					config.put("Name", name);
					config.put("Width", width);
					config.put("Height", height);
					config.put("Layers", Layers);
					config.put("CollisionType", colltype);
					configYML.setMap(config);
					configYML.save();
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
		}).start();
		System.out.println("Level save complete.");
	}