Implement index operators

Closes #18
Merge pull request #19 from bjz/index-operators

Implement index operators