Make some changes in methods EstablishmentRepository. Improve some code