Simplified / improved focus handling. Fixes #75, #126, …