Cartan matrix

Adding in the Cartan matrix functionality.