Adding a UML diagram because this is hopeless