cleanup of createKeys