Add win modal and refactor