Fixing industry merging

- Changed try/except to use `key in dict` idiom. 
- Changed sort to use attrgetter. 
- Moved sort outside for-loop.