More work on key handling

Adding and changing the key is working aswell as removing keys.
BUG: When removing a key, the key is removed but, the GUI doesn't update
the list correctly and there will be two of the same key, removing
either one of the objects deletes the key.