Nit: Declare `testElement` and `testElementProperties` at their first use.

I'm not convinced it's useful to have "address" in a variable. I'd suggest either hardcoding the name, or adding a helper function and passing "address" to it.