Use constants for the data array indices

I am failing to remember which of 0, 1, 2 is which. This should
make it clearer.