Convert variable/property binding helpers to templates.

That way it's easier to make a more generic version of registering functions.
Should be easier to read and understand.