Dynamic class creator.