Changed the way materials are edited