template methods replaced with componentfactory methods.