finish Alerts panel, improve code, fix bugs