several intermediate changes
Redefined focus() to focus only once rendered
several intermediate changes