Can compute index directly from key. Made fields private.