More code refactoring. Moved to Faraday library rather than HTTParty because it wasn't working.