Simplify the removal of unwanted lines from device.map.