Work on adding keys etc.

Added ability for adding keys. Still working on removing and setting the
selected key.