Add custom primary key field

Closes #54.