html: use integer loop, not for-in
js: use valid JSON even when testing html stand-alone
warn when losing bluetooth connection
eliminate js directory