Added Functional ORM tests
Fixed tests