Init template events