Improved speed and code readability.

Fixed line breaks causing invalid characters in Blender UI.
Heeding PEP8 guidelines.
Improved variable names.
Improved material renaming loop.