On the job for less than a year, Miami Beach Police Chief Dan Oates continues his very public effort to clean up the department. Oates was joined by City Manager Jimmy Morales and State Attorney Katherine Fernandez Rundle this afternoon to announce an investigation into officers who sent 540 racist, sexist, homophobic and other inappropriate and unprofessional texts and e-mails.

Captain Alex Carulo was fired earlier this morning for his involvement in the texting scandal. Major Angel Vazquez is also under investigation but has since retired, however. The majority of the e-mail involved came from those two, but dozens of other officers received them and said nothing, Oates says.

Oates also placed blame on his predecessor, former Police Chief Ray Martinez. He retired last year and took a cushy gig as the head of security for Ultra Music Festival.

Oates says Martinez knew about the scandal and did nothing. Oates also said that Martinez received many of the e-mails, but can't say if he opened them.

"At the very top, there was a tolerance for bad behavior," he said.

Many of the texts involved crude cartoons and internet memes that involved severely racist views of African-Americans.

Here's a file of racist emails uncovered in the investigation. Be warned: They are racist and terrible:

Vasquez, meanwhile, could face criminal charges — but not over the racist emails or the pornography he regularly sent on his official account. Instead, he's in hot water for emailing photos of the autopsy of Raymond Herisse, a man shot to death in an incident that involved over a dozen officers firing hundreds of rounds during Memorial Day Beach weekend in 2011. Though that incident took place four years prior, one of Oates' first major policy changes as chief was to ban officers from shooting at moving vehicles.

“Since I was appointed city manager, it has been my mission to root out corruption and wrongdoing in the administration," Morales says in a statement. "Police Chief Oates’ appointment was an integral step in our efforts and it has continued to have incredible results. This is just another example."

"It is a terrible shame and disservice to the many dedicated men and women of the Miami Beach Police Department that the deplorable actions of a few officers have led to today’s disclosures. However, today we have taken action to fix what has happened in the past."

Update 1: A separate CD of emails from Carulo and Vasquez details regular exchanges of pornography and sexually explicit jokes between the men. Carulo also exchanges sexual emails with an unidentified woman, with messages like "I want that tung (sic) on my cock" and "I want to see your titties. I don't want your boyfriend to be upset at me." Carulo also subscribes to DancingBear.com, a porn website, through his work account and then tries to cancel the $24.99 monthly subscription through the same account.