updating entity classes and closing generic classes