Refactoring javagal.rest classes