orm + views

more work on the orm and star working on the views.
.

.