rebuilt material compiler with a more OO design, added some testing ground work around it