Bug fixes & additions for the new material system.