Pass WordSelector instance to MenuBar class

This change is made so that MenuBar can change the mode directly.