Added data saving part for keys in sqlite