Refactor key