In the opening Barney and Andy are arguing. Barney says to Andy "There he goes. Every month pull up stakes like an Arab and off you go!" Andy replies "Barney that was 3 months ago I was thinking of moving to Raleigh" - this is a reference to The Andy Griffith Show: Goodbye Sheriff Taylor (1964).
What takes place here is a foreshadowing of Return to Mayberry (1986). In that TV movie that takes place 20 years after this episode and 18 years after the series ended, Andy Taylor returns to Mayberry and plans to run for his old job of Sheriff. When he arrives, he discovers that his old deputy and friend, Barney Fife, is planning to run also.