php uses ids with distinct suffixes; refactoring function locations and explicit var-passing in JS. awkward.
further work on refactoring towards standalone markups (not there yet)