ORM support added. Bug fixes.
Fixed db.