Separate responsibilities for class hierarchy parsing & dot serialization