Refactored slightly to reduce routes to empty rows.