Progress on the material system. should not compile atm