Code cleaning

More PEP8
Replace urllib2 by requests
Fix main()