starts adding functionality to materialwidgetbuilder, ref #167

WORKING COPY! Totally broken... Doesn't even compile ;).