- cleanups, Criteria and toArray fixes
- added relations to toArray