loader icon and autofocus. some ui code organization