more ap.c improvements
more ap.c improvements

juped/archaeology-cutoff,juped/archaeology-cutoff,juped/archaeology-cutoff,juped/archaeology-cutoff,juped/archaeology-cutoff,juped/archaeology-cutoff,juped/archaeology-cutoff,juped/archaeology-cutoff,juped/archaeology-cutoff,juped/archaeology-cutoff