Expansion of Matula Numbers to Heteroatoms and to Ring Compounds