Refactor sub
Split file
Refactor alert
Refactor