Add a vertx endpoint + refactoring