fixes to focusing, etc. also some refactoring