An easy way to rid football of homophobia and racism is for the FA to state quite clearly that if fans of a certain team continually engage in homophobic or racist language then their team loses points on whatever league they are playing in. And for the FA to state quite clearly that this is the reason the team is losing points.
Football is like a religion for many fans. If they know that their racist and homophobic language will cost their team points then it gives them a good incentive not to engage in it.
And the players can be encouraged to improve their own behaviour by indicating that any homophobic language from them will result in a 3 game suspension.