Template including changed, some bugs fixed