Refactoring javagal.rest