group refactoring remove dynamic creation of class