refactor and make jetty:run work