Move keys.py back to core