Convert arrays to objects

This makes it a little more sane to read, instead of trying to
understand indexes.
Merge pull request #4 from cman131/convert-arrays-to-objects

Convert arrays to objects