DRY up toIndex/toPane variables