Restructuring, JSON import

This is a Chrome-only version, fallbacks for other browsers are planned,
but not implemented.