Replace yaml by event dispatcher