anchor.diff:  -export([init/3, handle/2, terminate/3]).
   
   % Bridge abstraction
  --export([params/1, form/1, path/1, request_body/1, headers/1, header/3, response/2, reply/2]).
  +-export([params/1, path/1, request_body/1, headers/1, header/3, response/2, reply/2]).
   -export([cookies/1, cookie/2, cookie/3, cookie/5, delete_cookie/2, peer/1]).
   
  +% Handler state record
   -record(state, {headers, body}).
   
  +
   %% ====================================================================
  -%% Cowboy HTTP handler API
  +%% cowboy_http_handler API
   %% ====================================================================
   
  -init(_Transport, Req, _Opts) -> {ok, Req, #state{}}.
  -terminate(_Reason, _Req, _State) -> ok.
  -handle(Req, State) ->  {ok, NewReq} = n2o_document:run(Req), {ok, NewReq, State}.
  +init(_Transport, Req, _Opts) ->
  +    {ok, Req, #state{}}.
  +
  +handle(Req, State) ->
  +    {ok, NewReq} = wf_core:run(Req),
  +    {ok, NewReq, State}.
  +
  +terminate(_Reason, _Req, _State) ->
  +    ok.
   
   
   %% ====================================================================
   %% Cowboy Bridge Abstraction
   %% ====================================================================
   
  -params(Req) -> cowboy_req:qs_vals(Req).
  -form(Req) -> {ok,Params,NewReq} = cowboy_req:body_qs(Req), {Params,NewReq}.
  -path(Req) -> {Path,_NewReq} = cowboy_req:path(Req), Path.
  +params(Req) -> {Params, _NewReq} = cowboy_req:qs_vals(Req), Params.
  +path(Req) -> {Path, _NewReq} = cowboy_req:path(Req), Path.
   request_body(Req) -> veil_cowboy_bridge:apply(cowboy_req, body, [Req]).
   headers(Req) -> cowboy_req:headers(Req).
   header(Name, Value, Req) -> cowboy_req:set_resp_header(Name, Value, Req).
  
positive.code: cookie(Name, Value, Path, TTL, Req) ->
      Options = [{path, Path}, {max_age, TTL}],
      cowboy_req:set_resp_cookie(Name, Value, Options, Req).
  delete_cookie(Cookie,Req) -> cookie(Cookie,<<"">>,<<"/">>,0,Req).
  peer(Req) -> {{Ip,Port},Req} = cowboy_req:peer(Req), {Ip,Port}.
  
  
negative.code: %% ===================================================================
  
  -module(n2o_handler).
  -behaviour(cowboy_http_handler).
  
  -include_lib("veil_modules/control_panel/common.hrl").
  
  