added doctrine entities and fixed controllers