Unfortunately on public courts you will have to put up with the riff raff. Here in Italy in a town nearby there were 4 courts in a public park that were free and the people that played there pushed the limits of disgusting. Then a company was hired to manage the park and started charging a few Euros/hour and they all vanished, leaving just a few regulars, and I understand it is rather pleasant to play there now.
Evidently Free has its costs as you have found out. As one gets better it is always advantageous to play at tennis clubs where tennis etiquette is maintained. Besides the easier access to better players and tennis related services, not having to deal with situations like you described make it worthwhile.
3X PK Ki5 315 ::: 4X PSLGT and 1X PSL ::: 2X PSTGT and 1X PST
MCS mains and PPA crosses