removed API key, cleaned up code a bit