Added compound primary key support, docs and tests