Removes unnecessary print lines.