Restructure base classes

This is the first step in the base class cleanup. We now have material as the abstract base class and mineral and composite derived from it.