Convert Context to singleton and add key callback