More random refactoring.
Start a JSON-based test framework.