Tests are working and many things were fixed both in tests and in the model