Also added ability to decode html entities.