Update keys definition behaviour

* Keys now provide the `name`, `delimiter`, `optional` and `repeat` options
* Updated tests to match updated keys behaviour