Refactor|Material: Various minor cleanup refactorings