fixed string-to-js so that backslashes are escaped properly
fixed semicolon inconsistencies