Add some default cases and use material instead of id in some cases.