Improving Generate class