Moving comments js to a closure
Switch structKeyExists call to isDefined to deal with null values.
RB key tweak