Refactored for JAX-RS implementation
Refactoring