Fixed broken code from removed attributefactory class.