Improved material type functionality (plurals/default).
Removed unnecessary variable.