My final solution to the ShakespeareAnalyzer problem