Fix imports, move api_dev_key init