Refactor alert hider as class from singleton