Cleanup, bugfix and and sorting on alerts screen