Changed from urllib to requests to handle API calls.