Refactorings + new tests in db4j.
Some lib updates.