Began refactoring menu interaction code.