Refactor Api Key implementation.