Handle JSON encodering/decodering correctly.
Slight re-org of debugger architecture.