Finish up basic template logic.