Added emoji support
Modified Chain type code.