Added "smart" open line functions