Adding doctrine models
Adding models
minor modifications for compatibility