Added key mapping and functions