Make pairs into top and bottom for correct rendering in index and show views