Tentative fixes to focusing problems
Refactoring