Move HOT template code to its own module

Change-Id: Id491feb251db7a42eddd6dcdcc2f68628e6f8c22
Merge "Move HOT template code to its own module"