Refactoring javagal.rest module