libj full refactoring