Move a bunch of templates into the 'base' module.

Change-Id: If571b35aac1e6312feadcd8877e79b29e90adf9e