Return to 0-based indexing

Closes #85.