Unify line handling