remove alerts and unused code