Implemented CompositionResource and related classes for SMV file writing
and composition calculation.