 
   def render_feature_list(req, state) do
     req = :cowboy_req.set_resp_header("content-type", "application/json; charset=utf-8", req)
-    {:ok, features} = Yodado.FeaturePersistence.all()
+    {:ok, features} = Yodado.FeaturePersistence.all(state.c)
     body = features |> Enum.map(&Yodado.Feature.json/1) |> JSEX.encode!(indent: 2)
     {body, req, state}
   end

    {:ok, true} = features_json |> 
                JSEX.decode!(labels: :atom) |> 
                Enum.map(&Yodado.Feature.from_json/1) |>
                Yodado.FeaturePersistence.sync
    {true, req, state}
  end
end

defmodule Yodado.Web.Admin.FeatureListHandler do

  defrecord State, c: nil

  def init(_transport, _req, _opts) do
    {:upgrade, :protocol, :cowboy_rest}
  end

  def rest_init(req, _opts) do
    state = State.new(c: Yodado.FeaturePersistence.new)
    {:ok, req, state}
  end

  def allowed_methods(req, state) do
