Refactored materials code and added plenty of new materials.