added the NameGenerator interface and reorganised some packages.