Added key functionality and keys