Updating Key.js code