Prevent multiple initializations on the same element…

... and changed a couple of function statements to correct strict mode errors, resulting from nesting everything under an IF statement.