Defined relationships between models
Fixed some stuff