Rebuilding of material parser and added some monad bs