Handling keypresses and focus; improved styles