Code cosmetics, refactorings, bug fix.

Bug fix: When coming back from editor, reset the menu (position the
cursor and the scrollview in the very beginning).