Optimizes line definitions