Started work on the API.

Started work on the API.
Added a JSON encoder / decoder on the Lua side.

THIS COMMIT IS UNTESTED!