In Philadelphia, the May Democratic primary officially was an election to nominate the candidates for Mayor, City Council, row offices and local courts.

Unofficially, it was a feeding frenzy.

With so many candidates on the ballot (102), spending so much money -- $27 million and counting -- it was the best of times for the apparatchiks of the city's Democratic party.

The candidates for mayor pretty much ignored the party organization. They spent most of their millions on buying TV ads. But lesser-known candidates for Council seats and judgeships had to fork over millions to win support at the ward level.

Wards were pulling in two to three times the normal amount of money. Some consultants were making six figures in fees. People no one has ever heard of were offering their expert services, though it was sometimes tough to tell exactly what those services were.

A detailed review of election spending done by The Next Mayor revealed it was also the worst of times, at least when it came to obeying the law.

Here is a summary of what we found:

— Untraceable spending: A wad of money -- probably in excess of $750,000 -- simply disappeared from view. There is no record of how it was raised or spent because so many wards and Political Action Committees (PACs) ignored the state's campaign finance law and failed to file any reports. The law, which requires the regular filing of campaign finance disclosure reports, has been in effect since 1978. Yet 26 of the city's 69 Democratic wards failed to file a single scrap of paper about their finances. That should be a cause of concern for U.S. Rep. Bob Brady, the Democratic party chair, but it obviously does not. The 34th Ward, which Brady leads, did not file.

— Missing cash: This was money that slipped between the cup and the lip. It was recorded as being given by a candidate to a ward or a PAC, but it never appeared in the recipient's filings. It remains missing in action. The amounts were fairly large — in one case $9,500 — but these donations remain missing in action.

— Stealth PACs: A number of mystery PACs emerged, with a mélange of names and acronyms, that also raised and spent money but failed to register with the state -- again, as required by law. They also did not disclose their finances. One PAC in this category was the appropriately named Enigma PAC, which truly was an enigma.

— Consultants, Inc. Consultants have always been part of the political landscape. This year, it was hard to read through a candidate's spending report without coming across a half-dozen names with the word "consultant" next to them. Everyone got into the act. One large PAC hired a dozen ward leaders as "election consultants" and paid them fees ranging from $2,000 to $10,000.

Former ward leaders have served as consultants for years, mostly acting as Sherpa guides to candidates new to the system, to help them navigate the treacherous terrain of the wards. One slip, and you are likely to fall.

Former U.S. Rep. Michael "Ozzie" Myers falls into this category. Myers lost his House seat and went to jail in the early 1980's for his role in the Abscam scandal. (Recall the recent movie "American Hustle"?) He has offered political advice and guidance to clients for the last 15 years — and is highly regarded as a consultant with a deep knowledge of the wards.

It was a very good year for Myers. He had eight clients, most of them judicial candidates, who paid him $124,000 in fees -- though Myers said he refunded the fee paid by one judicial candidate because Myers felt the candidate could not win. (To understate it, refunds are rare in politics.)

Even Myers, 72, who has seen a lot in his time, is unhappy with the current state of affairs. "The whole political system gets worse and gets weaker," he said. He also scoffs at the profusion of consultants.

"Consultants?," he said. "All you need to do these days is have one person write you a check and you call yourself a 'consultant.'"

Speaking of which, there is Ed Nesmith, Democratic leader of South Philadelphia's Second Ward. Nesmith is an old-time pol who decided to become a new-age consultant. "I never charged people for advice before," he said. "But I woke up and realized that everyone else was doing it, so I decided to do it, too."

Nesmith got $35,000 as a consultant, with most of it coming from Ori Feibush, the Point Breeze developer who ran against Second District incumbent Councilman Kenyatta Johnson. Feibush spent more than $700,000 but got his clock cleaned, getting only 38 percent of the vote.

A chunk of that money went to Nesmith, though not directly.

Nesmith also was the man behind one of the mystery PACs called C.O.P.S., which stands for Citizens Organizing for Pennsylvania Securities, though no one is sure what that means.

The PAC did register with the state in 2007 but hasn't filed a campaign finance report for years, including this election cycle. C.O.P.S. took in $96,000 with $86,000 of that coming from Feibush.

(Note: Though there are no official records about C.O.P.S., the Next Mayor obtained information on this PAC and others who failed to file by examining the 400-plus campaign finance reports filed by candidates in the primary.)

Feibush said he had an agreement that Nesmith would field 500-plus street workers on Election Day to roust out voters in the 36th and 48th Wards. Vans were to be rented to shuttle the workers, supervisors were to be hired. There was even $7,000 set aside for food to feed the workers.

Feibush said Nesmith failed to live up to their agreement and, among other things, failed to field the number of street workers he promised.

The candidate was not amused. After Nesmith spurned his repeated requests for receipts to verify what was spent, Feibush said he decided to take the ward leader to court and file a civil suit alleging theft of services. That suit is due to be filed later this week.

"I still would have lost, so no one is crying over spilt milk," Feibush said. "But in this case there were very specific things that did not happen. Did it contribute to the loss? Yes."

Nesmith said he had receipts for every dollar spent, though he was initially vague about C.O.P.S., saying knew little about it. "It is a mystery to me," he said when asked about C.O.P.S. and its filing status.

In a second conversation, he said he did know about C.O.P.S. but said it filed disclosure reports with the city and the state. In fact, it did not.

Just to complete the circle, Nesmith also failed to file any campaign disclosure reports for the Second Ward, saying it did not take in any money from candidates. When it was pointed out that the ward got $5,400 from Democratic City Committee to pay street workers to support the endorsed ticket, Nesmith replied: "That money's not for the ward. That's for the committee people."

Then he added: "Do you mean to tell me that we are supposed to file a report on getting that money?"

The state's campaign finance law offers a simple answer to that question: Yes.

Though C.O.P.S. took in just under $100,000 during the primary, it was small potatoes compared to larger, above-ground political action committees.

A PAC called Genesis IV spent $325,000 in the primary and Liberty Square PAC spent $409,000, with most of it going to a coterie of wards and ward leaders. Who was behind these PACs?

To paraphrase Abraham Lincoln, these were committees of ward leaders, by ward leaders and for ward leaders.

To quote a less august politician, the maxim that applied to these PACs and others in the primary was first uttered by Tammany Hall boss George Washington Plunkitt 100 years ago: "I seen my opportunities and it took 'em."