Check that array contains the correct columns

Noted in #45.

Also changing i to key to maintain consistency