js: implement import/delete Key, some fixes