Minor cleanup, use json_decode on template, first draft of remaining bindings