Use '~' for newline detection, '%' collides with plist subs, simplify