fixed initialization of new JS objects (all new objects would be 'null' before this fix)
bug fix: switch statement didn't work w/ strings in case clauses