anchor.diff:  	{ok, Out} = battlemap_dtl:render(Templatevars),
   	{Out, ReqData, Ctx}.
   
  -finish_request(ReqData, {battle, _, Session} = Ctx) ->
  -	SessionUser = rpgb_session:get_user(Session),
  -	UserId = proplists:get_value(id, SessionUser),
  -	BadMaps = boss_db:find(rpgb_battlemap, [{name, equals, undefined}]),
  -	[boss_db:delete(BadMap:id()) || BadMap <- BadMaps],
  -	{true, ReqData, Ctx};
  -
  -finish_request(R, C) ->
  -	{true, R, C}.
  +%finish_request(ReqData, {battle, _, Session} = Ctx) ->
  +%	SessionUser = rpgb_session:get_user(Session),
  +%	UserId = proplists:get_value(id, SessionUser),
  +%	BadMaps = boss_db:find(rpgb_battlemap, [{name, equals, undefined}]),
  +%	[boss_db:delete(BadMap:id()) || BadMap <- BadMaps],
  +%	{true, ReqData, Ctx};
  +%
  +%finish_request(R, C) ->
  +%	{true, R, C}.
  
positive.code: 	case wrq:path_info(battle_id, ReqData) of
  		undefined ->
  			{false, ReqData, Ctx};
  		MapId ->
  			case boss_db:find(MapId) of
  				{error, Reason} ->
  					?info("Error finding battlemap ~p:  ~p", [MapId, Reason]),
  					{false, ReqData, {battle, MapId, Session}};
  				undefined ->
  					?info("Didn't find the battlemap ~p", [MapId]),
  					MaxMaps = proplists:get_value(max_maps, SessionUser),
  					UserId = proplists:get_value(id, SessionUser),
  					MapList = boss_db:find(rpgb_battlemap, [{owner_id, UserId}]),
  					MapListCount = length(MapList),
  					?info("List count:  ~p; max maps:  ~p", [MapListCount, MaxMaps]),
  					if
  						MaxMaps < 0 ->
  							{false, ReqData, {battle, MapId, Session}};
  						0 ->
  							{true, ReqData, {battle, MapId, Session}};
  						MapListCount < MaxMaps ->
  							{false, ReqData, {battle, MapId, Session}};
  						true ->
  
negative.code: 		E -> E
  	end,
  	Conditions = [{owner_id, equals, proplists:get_value(id, User)}],
  	{ok, Records} = rpgb_data:get_battlemaps_by_owner_id(proplists:get_value(id, User)),
  	Jsons = [begin
  		Url = rpgb:get_url(["battles",Rid,"slug"]),
  		Name = Rname,
  		{Etag, _, _} = generate_etag(ReqData, {battle, Record, Session}),
  		{struct, [
  			{<<"url">>, Url},
  			{<<"name">>, Name},
  			{<<"etag">>, list_to_binary(Etag)}
  		]}
  	end || #battlemap{id = Rid, name = Rname} = Record <- Records],
  	{mochijson2:encode(Jsons), ReqData, Ctx};
  
  to_json(ReqData, {battle, MapId, Session}) when is_list(MapId) ->
  	{ok, BattleMap} = rpgb_data:get_battlemap_by_id(MapId),
  	to_json(ReqData, {battle, BattleMap, Session});
  
  to_json(ReqData, {battle, BattleMap, Session} = Ctx) ->
  