public synchronized void removeListener(EventListener listener) {
		List<Class<?>> removeKeys = new LinkedList<>();
		for (Class<?> key : eventListeners.keySet()) {
			List<RegisteredListener> listeners = eventListeners.get(key);
			if (listeners == null) {
				removeKeys.add(key);
				continue;
			}
			
			List<RegisteredListener> removeListeners = new LinkedList<RegisteredListener>();
			for (RegisteredListener l : listeners) {
				if (l.getListener() == listener) {
					removeListeners.add(l);
				}
			}
			
			listeners.removeAll(removeListeners);
			
			if (listeners.isEmpty()) {
				removeKeys.add(key);
			}
		}
		
		for (Class<?> key : removeKeys) {
			eventListeners.remove(key);
		}
	}