Remove warning and unused code