removes unnecessary global and debug log