Update entities and
Clean code