Added lots of functionality to the material editor.