Button state. Refactor