Small changes to object layer for dbms compatibility. First steps in refactoring.