Many changes for using not so many templates.