Refactor dropwizard classes