Remove debug code
Add api key handling