Improved relations
Template models
Implemented some relationships