JS code cleanup

see 189
Intermediate checkin for l10n

see #195