Add general function for focusing window by class
Improve functions for selecting next window/frame

Add full support for emacs windows.
Fix typo