Reorder line-related functions