public HashMap<String, Behavior> loadFromDir(File dir) {
		
		dir.mkdirs();

		if (!dir.exists()) {
			this.logger.log(Level.WARNING, "Behavior directory not found: '" + dir
					+ "'");
			return this.behaviors;
		}

		ClassLoader loader;
		try {
			loader = new URLClassLoader(new URL[] { dir.toURI().toURL() },
					Behavior.class.getClassLoader());
		} catch (MalformedURLException ex) {
			this.logger.severe("Error while configuring behavior class loader. " + ex.getMessage());
			return this.behaviors;
		}
		for (File file : dir.listFiles()) {
			String name = file.getName();
			if (!name.endsWith(".class")) {
				continue;
			}
			
			//Remove extension
			name = name.substring(0, name.lastIndexOf("."));

			try {
				Class<?> clazz = loader.loadClass(name);
				
				Object object = clazz.getDeclaredConstructor(CraftButler.class)
						.newInstance(this.butler);
				if (!(object instanceof Behavior)) {
					this.logger.info("Not a valid behavior: " + clazz.getSimpleName());
					continue;
				}
				Behavior behavior = (Behavior) object;
				this.registerBehavior(behavior);
				
				name = behavior.getClass().getSimpleName();
				this.logger.info("Loaded behavior: " + name);
			} catch (Exception ex) {
				this.logger.warning("Error loading '" + name + "'");
				ex.printStackTrace();
			}
		}
		return this.behaviors;
	}