Support focus.
Refactor of file menu handlers.