Refactoring javagal layers