Added sort and simple alert management