Split long statement over several lines.

For readability.

Change-Id: Icd72476ac824abde2e54051e52baea4a7d92768c
Move the select builder into the TemplateExpander.

This is a more suitable location for the function.

Change-Id: I6b04a9cea3efb9cea61265300a1ed66b26a91bf0
Rename variable to fit pattern.

This also avoids having a trailing underscore.

Change-Id: Icd32356e24440c8e75c9da2f2ed9c47ffcd46db0