Fixed travis errors
Updated code based on review comments
Used 'request' instead of 'http'