API Key validation added to the codebase: