More tests and api_key fix