anchor.diff:              error_logger:error_msg("Missing or invalid boss.routes file in ~p~n~p~n", [RoutesFile, Error])
       end.
   
  +handle(StatusCode, State) ->
  +    _Result = case ets:lookup(State#state.handlers_table_id, StatusCode) of
  +        [] ->
  +            not_found;
  +        [#boss_handler{ application = App, controller = C, action = A, params = P }] ->
  +            ControllerModule = list_to_atom(boss_files:web_controller(App, C, State#state.controllers)),
  +            {Tokens, []} = boss_controller_lib:convert_params_to_tokens(P, ControllerModule, list_to_atom(A)),
  +            {ok, {App, C, A, Tokens}}
  +    end.
  +
  +route(Url, State) ->
  +    _Route = case get_match(Url, ets:tab2list(State#state.routes_table_id)) of
  +        undefined -> 
  +            case string:tokens(Url, "/") of
  +                [Controller] -> 
  +                    case is_controller(State, Controller) of
  +                        true -> {ok, {State#state.application, Controller, default_action(State, Controller), []}};
  +                        false -> not_found
  +                    end;
  +                [Controller, Action|Tokens] ->
  +                    case is_controller(State, Controller) of
  +                        true -> 
  +                            UnquotedTokens = lists:map(fun mochiweb_util:unquote/1, Tokens),
  +                            {ok, {State#state.application, Controller, Action, UnquotedTokens}};
  +                        false -> not_found
  +                    end;
  +                _ ->
  +                    not_found
  +            end;
  +        _Rte = #boss_route{ application = App, controller = C, action = A, params = P } -> 
  +            lager:info("Boss Route ~p ~p ~p ~p", [App, C, A, P]),
  +            ControllerModule = list_to_atom(boss_files:web_controller(App, C, State#state.controllers)),
  +            {Tokens, []}     = boss_controller_lib:convert_params_to_tokens(P, ControllerModule, list_to_atom(A)),
  +            {ok, {App, C, A, Tokens}}
  +    end.
  +
  +unroute(Controller, Action, Params, State) ->
  +    _RoutedURL = case ets:lookup(State#state.reverse_routes_table_id,
  +            {State#state.application, Controller, Action, lists:keysort(1, Params)}) of
  +        [#boss_reverse_route{ url = Url }] -> Url;
  +        [] -> undefined
  +    end.
  +
  +get_all(State) ->
  +    _Res = lists:map(fun(#boss_route{ url = U, application = App, controller = C, action = A, params = P }) -> 
  +                [{url, U}, {application, App}, {controller, C}, {action, A}, {params, P}]
  +        end, lists:flatten(ets:match(State#state.routes_table_id, '$1'))).
  +
   clean_params(Params) ->
       lists:foldl(fun(Key, Vars) ->
           proplists:delete(Key, Vars)
  
positive.code: 
  handle_info(_Info, State) ->
      {noreply, State}.
  
  load(State) ->
      RoutesFile = boss_files:routes_file(State#state.application),
  
negative.code:     load(State),
      {reply, ok, State};
  handle_call({handle, StatusCode}, _From, State) ->
      Result = handle(StatusCode, State),
      {reply, Result, State};
  handle_call({route, ""}, From, State) ->
      handle_call({route, "/"}, From, State);
  handle_call({route, Url}, _From, State) ->
      Route = route(Url, State),
      {reply, Route, State};
  handle_call({unroute, Controller, undefined, Params}, From, State) ->
      handle_call({unroute, Controller, default_action(State, Controller), Params}, From, State);
  handle_call({unroute, Controller, Action, Params}, _From, State) ->
      RoutedURL = unroute(Controller, Action, Params, State),
      {reply, RoutedURL, State};
  handle_call(get_all, _From, State) ->
      Res = get_all(State),
      {reply, Res, State};
  handle_call({set_controllers, ControllerList}, _From, State) ->
      {reply, ok, State#state{ controllers = ControllerList }}.
  