wip on the jpa module and refactorings in the hsearch module