Material Refractor

I moved parts of vaniilla's material section into the api.