Made dynamic discriminator compatible with genering entities, removed useless files