Getting messy with asynch calls
Checks/generates keys