Debounced the keyup event to fire change event

Added bit more complex template use case (foreach loop)