Remove alert alias and put it into a function

Signed-off-by: Mattijs Korpershoek <mattijs.korpershoek@gmail.com>