ENG-15 add doctrine, replace existing models with entities, fix tests