Refactorings to make app use more JAX-RS features